var typeList = false;
var ulBox = false;
$(function(){
	typeList = initData();
	
	ulBox = new ULBox({
		id:'content',
		formatHtml:function(data,id){
			return '<a id="'+this.target+'-a-'+id+'" href="#"><img src="'+data.image+'"/></a>';
		},onfocus:function(data,id,a){
			$(a).find('img').attr('src',data.highImage);
		},onblur:function(data,id,a){
			$(a).find('img').attr('src',data.image);
		},onclick:function(data,id,a){
			if(data.tar == 'setting'){
				$.log("url::"+"/yudiHotel/setting/index.html");
				BROWSER.Location('/yudiHotel/setting/index.html');
			}else if(data.tar == 'channel' || data.tar=="demo" || data.tar == 'movies'){
				$.gotoPage(data.url);
			}else{
				showGTip('This feature has not developed',5);
			}
		},
	});
	
	ulBox.setDataList(typeList,true);
});